<template>
	<view class="article-list-container">
		<view class="header">
			<text class="title">{{typeTitle}}</text>
		</view>
		<pc-article></pc-article>
	</view>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import  pcArticle  from '@/components/pcArticle.vue';
import { onLoad } from '@dcloudio/uni-app';

const typeTitleMap = {
	1: '医学知识',
	2: '四时养生',
	3: '食疗药膳',
	4: '名家医案'
};

const typeTitle = ref('');

onLoad((options) => {
		typeTitle.value = typeTitleMap[options.type] || '全部文章';
	});

</script>

<style lang="scss">
.article-list-container {
	background-color: #F8F5FF;
	height: 100vh;
	position: relative;
	.header {
		position: absolute;
		left: 20rpx;
		.title {
			font-size: 36rpx;
			font-weight: bold;
		}
	}
	pc-article{
		position: absolute;
		left: 50%;
		top: 50rpx;
	}

}
</style>